// ignore_for_file: must_be_immutable, prefer_typing_uninitialized_variables

import 'package:aitao_flutter/style/text_style.dart';
import 'package:flutter/cupertino.dart';

class ShowCenterTipsWidget extends StatelessWidget {
  ShowCenterTipsWidget(
      {super.key,
      required this.title,
      required this.des,
      required this.confirmCallback,
      this.option1 = '确定',
      this.option2 = '取消'});
  String title;
  String des;
  String option1;
  String option2;
  var confirmCallback;
  @override
  Widget build(BuildContext context) {
    return CupertinoAlertDialog(
      title: Text(title),
      content: Text(des),
      actions: [
        CupertinoDialogAction(
          child: Text(option2,style: Styles.blueText_15,),
          onPressed: () {
            Navigator.of(context).pop();
          },
        ),
        CupertinoDialogAction(
          child: Text(option1,style: Styles.blueText_15,),
          onPressed: () {
            Navigator.of(context).pop();
            confirmCallback(option1);
          },
        ),
      ],
    );
  }
}
